package com.trendytech.tds.message.dao;

import java.util.List;

import com.trendytech.tds.entity.SystemThresholdEntity;

import hm.base.dao.IBaseDAO;

public interface ISystemThresholdDAO extends IBaseDAO<SystemThresholdEntity>  {
	
	/**
	 * 根据阈值类型获取相应的阈值
	 * @param type
	 * @return
	 */
	public List<SystemThresholdEntity> getSystemThresholdByType(int type);
	
	/**
	 * 根据创建者获取相应的阈值
	 * @param type
	 * @return
	 */
	public List<SystemThresholdEntity> getSystemThresholdByCreator(String creator);
	
	/**
	 * 根据阈值类型和创建人获取相应的阈值
	 * @param entity
	 * @return
	 */
	public SystemThresholdEntity getSystemThresholdByTypeAndCreator(SystemThresholdEntity entity);
	
	
	/**
	 * @param id
	 * @return
	 */
	public SystemThresholdEntity getSystemThresholdById(String id);
	
	/**
	 * 删除所有记录
	 * @return
	 */
	public int deleteAll();
	
	/**
	 * 删除@creator的所有记录
	 * @param creator
	 * @return
	 */
	public int deleteByCreator(String creator);
	
	/**
	 * 删除指定类型和创建人的所有记录
	 * @param entity
	 * @return
	 */
	public int deleteByTypeAndCreator(SystemThresholdEntity entity);
	
	/**
	 * 删除指定类型所有记录
	 * @param entity
	 * @return
	 */
	public int deleteByType(SystemThresholdEntity entity);
	
	/**
	 * 查询全部信息
	 * @return
	 */
	public List<SystemThresholdEntity> getSystemThreshold();
	
	/**
	 * @param entity
	 * @return
	 * @author juhua
	 */
	public int updateThresholdByEntity(SystemThresholdEntity entity);
	
	/**
	 * @param entity
	 * @return
	 * @author juhua
	 */
	public int insertThreshold(SystemThresholdEntity entity);
	
	/**
	 * 
	 * @param type
	 * @return
	 */
	public int getImportance(int type);

	public int updateByEntity(SystemThresholdEntity entity);
}
